#include <stdio.h> 
 
int main(){
	char c;
    int num;        
	int row = 1;    
	scanf("%d %c", &num, &c); 
	num --; 
	while(num >= 2*(row+2)){ 
		num -= 2*(row+2);   
		row += 2;           
	}
    int star_num = row;
	
	for(int i = 1; i < row+1; i ++){
        
        if(i <= row/2){
        
            for(int n = 0; n < i-1; n++){
                printf(" ");
            }
            
            for(int m = 1;m < star_num+1;m ++){
				printf("%c",c);
			}
	        star_num -= 2;
	    
        }else{
        	
            for(int n = 0; n < row-i; n++){
                printf(" ");
            }
            
            for(int m = 1;m < star_num+1;m ++){
				printf("%c",c);
			}
	        star_num += 2;
        }
		printf("\n");
		
	}
	printf("%d",num);
}
